#ifndef KMP_HPP
#define KMP_HPP

#include <vector>
#include <string>
#include <iostream>

using namespace std;

class  KMP_Matcher
{
private:
    vector<int> pi;
    string T;
    string P;
    int T_length;
    int P_length;

    vector<int> compute_prefix_function();
    
public:
    KMP_Matcher(string T, string P);
    void run_KMP_Matcher();
    void print_pi();
};


#endif